package com.inspur.security.cbb3.kms.keyusage.dataorders.service;

import com.inspur.security.cbb3.kms.keyusage.data.po.DataBean;
import com.inspur.security.cbb3.kms.keyusage.dataorders.po.DataOrdersBean;
import com.inspur.security.cbb3.kms.keyusage.dataorders.vo.DataOrdersAddVO;
import com.inspur.security.cbb3.kms.utils.PageRequestDate;
import javassist.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.MissingServletRequestParameterException;

/**
 * DataOrdersService
 *
 * @author liukai
 * @date 2020/10/15
 **/
public interface DataOrdersService {

    /**
     * 新增数据订单
     * @param dataOrdersBean 订单参数
     * @return dataOrder_uuid
     */
    DataOrdersBean addDataOrder(DataOrdersBean dataOrdersBean, DataBean dataBean) ;

    /**
     * 数据订单分页查询
     * @param pageRequestDate 查询参数
     * @return 查询到的数据订单集
     */
    Page<DataOrdersBean> searchDataOrders(PageRequestDate pageRequestDate,DataOrdersAddVO searchParams);

    /**
     * 根据uuid查询数据订单
     * @param uuid 订单uuid
     * @return 查询到的数据订单
     */
    DataOrdersBean searchDataOrder(String uuid) throws NotFoundException, MissingServletRequestParameterException;

    /**
     * 根据订单uuid删除订单
     * @param uuid 订单uuid
     * @return 删除结果
     */
    void deleteDataOrder(String uuid) throws MissingServletRequestParameterException, NotFoundException;

    /**
     * 系统定时自动删除数据订单（完成的）
     */
    void deleteAuto();

    /**
     * 推送数据订单
     * @param uuid 订单uuid
     */
    void sendOrder(String uuid);

    /**
     * mq处理数据订单
     * @param uuid 订单uuid
     */
    void mqHandleOrder(String uuid);

}
